    /**
     * {{ model_class }} create.
     *
     * @return View
     */
    public function getCreate()
    {
        {# TODO: create relations select list
        // Get all the available groups
        $groups = Sentry::getGroupProvider()->findAll();

        // Selected groups
        $selectedGroups = Input::old('groups', array());

        // Get all the available permissions
        $permissions = Config::get('permissions');
        $this->encodeAllPermissions($permissions);

        // Selected permissions
        $selectedPermissions = Input::old('permissions', array('superuser' => -1));
        $this->encodePermissions($selectedPermissions);
        #}

        // Show the page
        return View::make('{{ namespace|replace({'\\': '.'}) }}.{{ model_class }}.create'
            {%- if false -%}
            {# TODO: pass relation select variables
            , compact('groups', 'selectedGroups', 'permissions', 'selectedPermissions')
            #}
            {%- endif -%}
            )
{% if relations.belongsTo is defined %}
{% for related, related_model in relations.belongsTo %}
            ->with('{{ related }}_list', {{ related_model }}::lists('name', 'id'))
{% endfor %}
{% endif %}
        ;
    }

    /**
     * {{ model_class }} create form processing.
     *
     * @return Redirect
     */
    public function postCreate()
    {
        // Create a new validator instance from our validation rules
        $validator = Validator::make(Input::all(), $this->validationRules);

        // If validation fails, we'll exit the operation now.
        if ($validator->fails())
        {
            // Ooops.. something went wrong
            return Redirect::back()->withInput()->withErrors($validator);
        }


        // Create a new {{ model_name }}
        ${{ model_name }} = new {{ model_class }}();

        // Update the {{ model_name }} data
{% for field in fields %}
        ${{ model_name }}->{{ field }} {% for i in 0..(25-(field|length)) %} {% endfor %}= e(Input::get('{{ field }}'));
{% endfor %}

        // Was the {{ model_name }} created?
        if(${{ model_name }}->save())
        {
            // Redirect to the new {{ model_name }} page
            return Redirect::to("{{ route_prefix }}/{{ model_name }}/${{ model_name }}->id/edit")->with('success', '{{ model_class }} created successfully');
        }

        // Redirect to the {{ model_name }} create page
        return Redirect::to('{{ route_prefix }}/{{ model_name }}/create')->with('error', '{{ model_class }} was not created, please try again.');
    }
